One or more aspects relate, in general, to processing within a computing environment, and in particular, to comparison processing within the computing environment.
Many programming languages, which are used to create applications that perform functions within a computing environment, execute operations that employ a three way indicator to indicate certain predicates, such as less than (<), greater than (>), or equal (=). For instance, in string processing (e.g., string compares or memory compares), a −1, 1, or 0 is returned based on whether a first operand is less than, greater than or equal to a second operand, respectively. A further example is provided when a sign function is computed as an integer.
In order to provide this three way indicator, however, multiple comparisons are typically used within a complex, data dependent control flow. Further, optimizations, such as automatic prediction, may be attempted, but these still use an excessive number of (e.g., more than 2) instructions and/or architected registers.